<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
?>

<!-- JavaScript -->
<script type="text/javascript" src="<?= base_url() ?>js/wufoo.js"></script>
<!--<script src="<?= base_url() ?>js/chosen.jquery.js" type="text/javascript"></script>-->
<!-- CSS -->
<!--<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form.css" media="screen, tv, projection" title="Default" />-->
<link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>css/datepicker.css" media="screen, tv, projection" title="Default" />
<script type="text/javascript" src="<?= base_url() ?>js/datepicker.js"></script>
<link rel="stylesheet" href="<?php echo base_url() ?>css/chosen.css" />

<?php 
if($type == 'xls'){
	header("Content-type: application/vnd.ms-excel");
	header("Content-Disposition: attachment;Filename=$filename.xls");
}

?>
<div>

<table border=0 cellspacing="5" width="300" style="font-size:12px;">
<tr>
	<td align="right" width="150"><img src="<?php echo base_url(); ?>images/main/logo_sma.jpg" width="110" height="100" ></td>
	<td>&nbsp;</td>
	<td valign="bottom" width="300" colspan="3"><font size="6">SMA NEGERI 2 SIDOARJO</font><br><font size="3" valign="top"><i>Jl. Lingkar Barat Gading Fajar 2 Sidoarjo</i></font></td>
</tr>
<tr>
	<td colspan="5" align="center">&nbsp;</td>
</tr>	
<tr>
	<td colspan="5" align="center">&nbsp;</td>
</tr>
<tr>
	<td colspan="5" align="center"><font size="3"><b>DAFTAR GURU</b></font></td>
</tr>
<tr>
	<td colspan="5" align="center">&nbsp;</td>
</tr>
</table>
<br>
<table width="500" border=1 style="font-family: Verdana, Geneva, Arial, Helvetica, sans-serif ;
	font-weight: normal;
	font-size: 11px;border-collapse: collapse;" cellspacing="0">
	<tr><td width="20" align="center">No.</td>
		<td width="50"  align="center">NIP</td>
		<td width="150"  align="center">Nama Lengkap</td>
		<td width="20" nowrap align="center">Jenis Kelamin</td>
		<td width="100" align="center">Tempat, Tanggal Lahir</td>
		<td width="100" align="center">Alamat Asal</td>
		<td width="100" align="center">Alamat Domisili</td>
		<td width="100" align="center">No.HP</td>
	</tr>
	<? $i=1; foreach($guru->result() as $row){ ?>
		<tr>
			<td width="10" align="center"><?php echo $i++;?></td>
			<td align="left"><?php echo $row->NIP; ?></td>
			<td width="150" align="left"><?php if($row->GELAR_DEPAN != '') ECHO $row->GELAR_DEPAN.'. '; ELSE ECHO '';?><?PHP ECHO $row->NAMA_LENGKAP;?><?PHP IF($row->GELAR_BELAKANG != '') ECHO ', '.$row->GELAR_BELAKANG?></td>			
			<td><?php echo $row->JENIS_KELAMIN;?></td>
			<td><?php echo $row->TEMPAT_LAHIR;?>, <?php echo xFormatDate($row->TANGGAL_LAHIR);?></td>
			<td><?php echo $row->ALAMAT_ASAL;?></td>
			<td><?php echo $row->ALAMAT_DOMISILI;?></td>
			<td><?php echo $row->HP;?></td>
		</tr>
	<?}?>
</table>
</div>